<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
	<th:block th:include="include :: header('新增版块')" />
</head>

<body class="white-bg">
	<div class="wrapper wrapper-content animated fadeInRight ibox-content">
		<form class="form-horizontal m" id="form-item-add">
		    
			<div class="form-group">
				<label class="col-sm-3 control-label"><span style="color: red; ">*</span>板块名称：</label>
				<div class="col-sm-8">
					<input class="form-control" type="text" name="name" id="name" required>
				</div>
			</div>

			<div class="form-group">
				<label class="col-sm-3 control-label">排序：</label>
				<div class="col-sm-8">
					<input class="form-control" type="text" name="sort" id="sort" required >
				</div>
			</div>
			
			<div class="form-group">
				<label class="col-sm-3 control-label">版主：</label>
				<div class="col-sm-8">
					<select name="user.userId" class="form-control m-b" >
                		<option th:each="user : ${userList}" th:text="${user.userName}" th:value="${user.userId}"></option>
            		</select>
				</div>
			</div>
			
			
				
		</form>
	</div>
	
	<th:block th:include="include :: footer" />
	
	<script type="text/javascript">
		var prefix = ctx + "bbs/section";
		
		function submitHandler() {
	        if ($.validate.form()) {
	        	$.operate.save(prefix + "/add", $('#form-item-add').serialize());
	        }
	    }
		
		$("#form-item-add").validate({
			onkeyup: false,
			rules:{
				sort:{
					digits:true
				}
			},
			messages: {
		        
		    },
		    focusCleanup: true
		});
		
		
		
	</script>
</body>
</html>
